import { request } from "umi";

//知识小册接口
export function getknowledgelist(page: number = 1, pageSize: number = 12, status: any = 'publish') {
    return request('/api/knowledge', {
        params: {
            page,
            pageSize,
            status,
        },
    })
}
//推荐阅读接口

export function getarticlelist() {
    return request('/api/article/recommend', {
    })
}
//文章分类接口

export function getcategorylist() {
    return request('/api/category', {
        params: {
            articleStatus: 'publish'
        },
    })
}

//详情接口
export function getknowledgeDetail(kid: string) {
    return request(`/api/knowledge/${kid}`)
}

//文章标签接口
export function getarticlelabel() {
    return request('/api/tag', {
        params: {
            articleStatus: 'publish'
        },
    })
}
//https://creationapi.shbwyz.com/api/tag?articleStatus=publish
//https://creationapi.shbwyz.com/api/category?articleStatus=publish
//https://creationapi.shbwyz.com/api/article/recommend
// https://creationapi.shbwyz.com/api/knowledge?page=1&pageSize=12&status=publish
//https://creationapi.shbwyz.com/api/knowledge/755c919d-3c16-4e8b-bcb5-9e7b2d2a10e2